<template>
  <div class="PkgInfo-container">
    <van-cell-group title="基本信息">
      <van-cell title="项目名称" :value="name"></van-cell>
      <van-cell title="项目版本" :value="version"></van-cell>
      <van-cell title="最后编译时间" :value="lastBuildTime"></van-cell>
    </van-cell-group>
    <van-cell-group title="生产环境依赖">
      <van-cell v-for="([key,value],index) of Object.entries(dependencies)" icon="warning-o" 
       :key="index" :title="key" :value="value">
      </van-cell>
    </van-cell-group>
    <van-cell-group title="开发环境依赖">
      <van-cell v-for="([key,value],index) of Object.entries(devDependencies)" icon="warning-o" 
       :key="index" :title="key" :value="value">
      </van-cell>
    </van-cell-group>
  </div>
</template>

<script setup lang="ts">
const { pkg, lastBuildTime } = __APP_INFO__
const { dependencies, devDependencies, name, version } = pkg
</script>